                <h2>Верхняя одежда</h2>
                <div class="intra">
                    <div class="b">
                        <div class="l">
                            <div class="r">
                                <div class="r-t">
                                    <div class="r-b">
                                        <div class="l-t">
                                            <div class="l-b">
                                                <div class="box">
                                                    <ul>
                                                        <li><a href="<?=$this->url(array('price'=>1))?>"><span>Цены от высшей</span></a></li>
                                                        <li><a href="<?=$this->url(array('price'=>0))?>" ><span>Цены от низшей</span></a></li>
                                                    </ul>
                                                    <form action="#" class="sel-f">
                                                        <fieldset>
                                                            <select class="sel">
                                                                <option <?php  if(!$this->brand) echo "SELECTED";?> value="">Все бренды</option>
                                                                <?php foreach($this->category->brands as $brand):?>
                                                                
                                                                <option <?php if($brand==$this->brand) echo "SELECTED"?> value="<?=$brand?>"><?=$brand?></option>
                                                                <?php endforeach;?>
                                                            </select>
                                                        </fieldset>
                                                    </form>
                                                </div>
                                                <div class="container">
                                                    <div class="holder">
                                                        <strong>Размеры:</strong>
                                                        <ul>
                                                        <?php foreach($this->category->sizes as $size):?>
                                                            <li <?php if($this->size == $size) echo 'class="all"'?>><a href="<?=$this->url(array('size'=>$size))?>">
                                                                <?php if($this->size == $size):?>
                                                                    <em><?=$size?></em>
                                                                <?php else:?>
                                                                    <span><?=$size?></span>
                                                                <?php endif;?>
                                                            </a></li>
                                                        <?php endforeach;?>
                                                        <li <?php if(!$this->size) echo 'class="all"'?>><a href="<?=$this->url(array('size'=>null))?>">
                                                            <?php if(!$this->size):?>
                                                            <em>все размеры</em>
                                                            <?php else:?>
                                                            <span>все размеры</span>
                                                            <?php endif;?>
                                                            </a></li>
                                                        </ul>
                                                    </div>
                                                    <div class="holder">
                                                        <strong>Категории:</strong>
                                                        <ul>
                                                        <?php foreach($this->category->categorys as $category):?>
                                                            <li <?php if($category == $this->class) echo 'class="all"';?>><a href="<?=$this->url(array('class'=>$category))?>">
                                                            <?php if($category == $this->class):?>
                                                                <em>
                                                            <?php else:?>
                                                                <span>
                                                            <?php endif;?>
                                                            <?php switch($category){
                                                                case 'LUX' : 
                                                                    echo "новинка";
                                                                    break;
                                                                case '1' : 
                                                                    echo '1-я уценка';
                                                                    break;
                                                                case '2' :
                                                                    echo '2-я уценка';
                                                                    break;
                                                                case '3': 
                                                                    echo 'распродажа';
                                                                    break;
                                                            }?>
                                                             <?php if($category == $this->class):?>
                                                                </em>
                                                            <?php else:?>
                                                                </span>
                                                            <?php endif;?></a></li>
                                                        <?php endforeach;?>
                                                            <li <?php if(!$this->class) echo 'class="all"'; ?> ><a href="<?=$this->url(array('class'=>null))?>">
                                                            <?php if(!$this->class):?>
                                                                <em>
                                                            <?php else:?>
                                                                <span>
                                                            <?php endif;?>
                                                                все категории
                                                            <?php if(!$this->class):?>
                                                                </em>
                                                            <?php else:?>
                                                                </span>
                                                            <?php endif;?>
                                                            </a></li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <ul class="tovar">
                    <?php foreach($this->products as $product):?>
                    <li>
                            
                            <h3><a href="/product/view/id/<?=$product->id?>"><?=$product->brand?>, размер <?=$product->size?>  </a></h3>
                            <div class="box">
                                <div class="image-box">
                                    <div class="image"><img src="/images/img01.jpg" alt="" /></div>
                                    <strong class="size"><?=$product->size?></strong>
                                </div>
                                <div class="text">
                                 
                                        <div class="top">
                                            <?php 
                                                switch($product->category){
                                                    case 'LUX' :
                                                        ?>
                                                         <strong class='new'>новинка</strong>
                                                        <?php 
                                                    break;
                                                    case '1':?>
                                                        <span class="sk25">скидка от <strong>25%</strong></span>
                                                        <?php 
                                                        break; 
                                                    case '2':?>
                                                        <span class="sk75">скидка от <strong>75%</strong></span>
                                                        <?php 
                                                        break; 
                                                    case '3':?>
                                                         <strong class="ras">РАСПРОДАЖА</strong>
                                                        <?php 
                                                        break; 
                                                }
                                            ?>
                                         
                                        </div>
                                    <div class="box">
                                        <span class="price"><?=$product->price?><em>руб.</em></span>
                                    </div>
                                    <div class="box">
                                        <a href="/cart/add/id/<?=$product->id?>/"><span>Положить в корзину</span></a>
                                    </div>
                                </div>
                            </div>
                        </li>
                <?php endforeach;?>

</ul>
<?= $this->paginationControl($this->products, 'Sliding', 'paginator.phtml'); ?>
<script>
            $(document).ready(function(){
                $('.sel').change(function(){
                    value = $(this).val();
                    if(value){
                    window.location.href = '<?= $this->url(array('brand'=>null));?>'+'/brand/'+value;
                    } else {
                    	window.location.href = '<?= $this->url(array('brand'=>null));?>';
                    }
                });
            });
 </script>